import store from '@/store'

export function createWebSocket(url: string): WebSocket | null {
  const token = store.getters.token
  if (!token) {
    return null
  }
  return new WebSocket(url)
}
